<template>
	<view class="apps">
		<uv-navbar :title="title" titleStyle="font-weight:400;" bg-color="rgba(255,255,255,.01)" :autoBack="true" placeholder></uv-navbar>
		<image class="bg" src="https://lifeanclor.byyds.cn/static/images/lan.jpg" mode="widthFix"></image>
		<uv-gap height="20"></uv-gap>
		<view class="pr mlr20 zidx6">
			<uv-grid :border="false" col="2">
				<uv-grid-item>
					<view class=" mh200 mb20 ptb20 bgwhite bdr20 " style="width: 330rpx; box-sizing: border-box;" @click="handle('/pages/device/'+mode+'?id=1')">
						<view class="flex aic mb20 plr20">
							<uv-icon name="https://lifeanclor.byyds.cn/static/images/icon1.png"  size="40px"></uv-icon>
							<view class="f14 c333 fw400 ml10">模式名称</view>
						</view>
						<uv-cell-group :border="false">
								<uv-cell cellStyle="padding:2px 4px;" title="温度" value="45℃" :border="false"></uv-cell>
								<uv-cell cellStyle="padding:2px 4px;" title="杯量" value="500ml" :border="false"></uv-cell>
						</uv-cell-group>
					</view>
				</uv-grid-item>
				<uv-grid-item>
					<view class=" mh200 mb20 ptb20 bgwhite bdr20 " style="width: 330rpx; box-sizing: border-box;">
						<view class="flex aic mb20 plr20">
							<uv-icon name="https://lifeanclor.byyds.cn/static/images/icon1.png"  size="40px"></uv-icon>
							<view class="f14 c333 fw400 ml10">模式名称</view>
						</view>
						<uv-cell-group :border="false">
								<uv-cell cellStyle="padding:2px 4px;" title="温度" value="45℃" :border="false"></uv-cell>
								<uv-cell cellStyle="padding:2px 4px;" title="杯量" value="500ml" :border="false"></uv-cell>
						</uv-cell-group>
					</view>
				</uv-grid-item>
				<uv-grid-item>
					<view class="mh200 mb20 ptb20 plr20 bgwhite bdr20 mlr20 aic" style="width: 330rpx; box-sizing: border-box;">
						<view class="flex jcc ptb20">
							<view class="c02A33 f14 flex aic mt30">
								<uv-icon name="plus" size="20" color="#02A33"></uv-icon>
								<text class="ml30">增加</text>
							</view>
						</view>
					</view>
				</uv-grid-item>
			</uv-grid>
		</view>
	</view>
</template>

<script setup>
	import { ref , reactive, nextTick, computed } from 'vue'
	import { onLoad, onShow, onHide } from '@dcloudio/uni-app'
	const title =ref(''),mode=ref('')
	const handle = (e) => {
		uni.navigateTo({
			url:e,
		})
	}
	onLoad((e)=>{
		console.log(e.mode);
		mode.value =e.mode;
		console.log()
		switch (e.mode){
			case 'basic':
				title.value = '常规模式'
				break;
			case 'unique':
				title.value = '独家定制'
				break;
			case 'kettle':
				title.value = '常规模式'
				break;
			case 'general':
				title.value = '一般定制'
				break;
			default:
				title.value = '水壶模式'
				mode.value = e.mode;
				break;
		}
	})
</script>

<style>

</style>
